<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{$basic.title}</title>
    <link href="__UI__/css/bootstrap.min.css" rel="stylesheet">
    <link href="__UI__/font-awesome/css/font-awesome.css" rel="stylesheet">
    <link href="__UI__/css/animate.css" rel="stylesheet">
    <link href="__UI__/css/style.css" rel="stylesheet">
</head>
<body>
<div id="wrapper">

    <nav class="navbar-default navbar-static-side" role="navigation">
        <div class="sidebar-collapse">
            <ul class="nav metismenu" id="side-menu">
                <li class="nav-header">
                    <div class="dropdown profile-element">
						<img class="rounded-circle am_pic" src="{$user_info.pic}" data-toggle="modal" data-target="#myModal" style="width: 6.25rem;">
                        <a data-toggle="dropdown" class="dropdown-toggle" href="#">
                            <span class="block m-t-xs font-bold">{$user_info.username}</span>
							 <span class="text-muted text-xs block">上次登陆时间:</span>
                            <span class="text-muted text-xs block">{$user_info.last_login_time}<b class="caret"></b></span>
							
                        </a>
                        <ul class="dropdown-menu animated fadeInRight m-t-xs" >
							<li><a id="userInfo" class="dropdown-item J_menuItem" data-index="edit_user_info" href="{:url('user/edit')}?id={$user_info.id}">修改信息</a></li>
                            <li><a class="dropdown-item" href="{:url('index/logout')}">退出</a></li>
                        </ul>
                    </div>
                    <div class="logo-element">
                        Xaoam
                    </div>
                </li>
				{volist name="menu" id="vo" key="k"}
                <li class="menu {if $k == 1}active{/if}"><a  href="{$vo.url}" ><i class="{$vo.icon}"></i> <span class="nav-label">{$vo.node_name}</span> </a>
					{if isset($vo.child) }
					<ul class="nav nav-second-level collapse {if $k == 1}in{/if}" aria-expanded="false">
								{volist name="vo.child" id="voo"}
						<li><a class="J_menuItem" href="{$voo.url}" data-index="{$voo.url}"><i class="{$voo.icon}"></i>{$voo.node_name}</a></li>
								{/volist}
					</ul>
					{/if}
				</li>
				{/volist}
            </ul>

        </div>
    </nav>

    <div id="page-wrapper" class="gray-bg">
        <div class="row border-bottom">
            <nav class="navbar navbar-static-top white-bg" role="navigation" style="margin-bottom: 0">
                <div class="navbar-header">
                    <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                </div>
                <ul class="nav navbar-top-links navbar-right">
                    <li>
                        <a href="{:url('index/win')}" alt="切换窗口"><i class="icon fa fa-dashboard"></i>切换
                             
                        </a>
                    </li>
                </ul>

            </nav>
        </div>
        <div class="row content-tabs">
        		<nav class="page-tabs J_menuTabs">
                        <div class="page-tabs-content">
                            <a href="javascript:;" class="active J_menuTab" data-id="defaults">首页</a>
                        </div>
                    </nav>
                    <div class="btn-group roll-nav roll-right">
                        <button class="dropdown J_tabClose" data-toggle="dropdown">常用操作<span class="caret"></span>
        
                        </button>
                        <ul role="menu" class="dropdown-menu dropdown-menu-right">
                            <li class="divider"></li>
                            <li class="J_tabShowActive"><a>定位当前选项卡</a>
                            </li>
                            <li class="divider"></li>
                            <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
                            </li>
                            <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
                            </li>
                        </ul>
                    </div>
                    <a href="{:url('index/logout')}" class="roll-nav roll-right J_tabExit"><i class="fa fa fa-sign-out"></i>
                        注销</a>
        
        		</div>
					<div class="row J_mainContent" id="content-main">
						<iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="{:url('index/defaults')}" frameborder="0" data-id="defaults" seamless=""></iframe>
					</div>
    </div>
</div>
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
            </div>
            <div class="row modal-body">
				{volist name="Think.config.default_pic" id="row"}
					<div class="profile-image" style="width: 6.875rem;">
                        <a href="javascript:;"><img src="/static/pic/{$row}" class="rounded-circle circle-border" alt="profile"></a>
                    </div>
				{/volist}
			</div>
            <div class="modal-footer">
				
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal -->
</div>
<!-- Mainly scripts -->
<script src="__UI__/js/jquery-3.1.1.min.js"></script>
<script src="__UI__/js/popper.min.js"></script>
<script src="__UI__/js/bootstrap.min.js"></script>
<script src="__UI__/js/plugins/metisMenu/jquery.metisMenu.js"></script>
<script src="__UI__/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

<!-- Custom and plugin javascript -->
<script src="__UI__/js/inspinia.js"></script>
<script src="__UI__/js/plugins/pace/pace.min.js"></script>
<script src="__UI__/js/plugins/contabs.js"></script>
<script>
	$('#userInfo').on('click',function(){
		$(this).parent().parent().removeClass('show');
	})
	$(document).on('click','.profile-image>a>img',function(){
			let pic = $(this).attr('src');
			
			$.ajax({
				url:"{:url('index/pic')}",
				data:{'pic':pic},
				type:'post',
				dataType:'Json',
				success:function(res){
					if(res.code == 200){
						$('.am_pic').attr('src',pic);
						$('#myModal').modal('hide');
					}
					
				}
			})
	})
</script>
</body>
</html>
